<?php

namespace App\Http\Controllers\Common;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Storage;

class DownloadController extends Controller
{
    public function download(Request $request,$src_id){
        if(!Storage::has($src_id)){
            return abort(404,'访问的资源不存在!');
        }
        return response()->download(storage_path('app/' . $src_id));
    }
}
